package com.example.demo;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface Repo extends CrudRepository<LoveEvent,Integer> {
    Page<LoveEvent> findAll(Pageable p);
    LoveEvent findById(int id);
    void deleteById(int id);
    @Query(nativeQuery = true,value = "SELECT max(id) from love_event")
    int getMaxId();
}
